<!doctype html>
<html>
<head>
</head>
<body>
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
?>

<!-- JavaScript -->
<script type="text/javascript" src="<?php echo base_url() ?>js/wufoo.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>js/zebra_datepicker.js"></script>

<script type="text/javascript" src="<?php echo base_url() ?>public/highcharts/js/highcharts.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>public/highcharts/js/modules/exporting.js"></script>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />
<link rel="stylesheet" href="<?php echo base_url() ?>css/zebra_datepicker_metallic.css" type="text/css">
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/chosen.css" media="screen, tv, projection" title="Default" />

<div id="container">
	<?php
    //Setting Awal Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
	
	$value = array(
		'tahun'					=> "",
		'requested'				=> "",
		'solved'				=> "",
		'legend'				=> "Grafik Data Helpdesk",
		'info'					=> "Grafik Data Helpdesk"
	);
	?>
	<fieldset class="fieldset">
	<legend class="legend">
		<?= $value["legend"] ?> |
	</legend>
	<div>
		<?php echo anchor(site_url('data_rekap'),img(array('src'=>'images/main/ic_back.png','border'=>'0','alt'=>'','width'=>'20px','height'=>'20px','margin-right'=>'10px')).' Kembali ke rekap tahunan',' Menampilkan halaman rekap tahunan'); ?>
	</div>
	
	<div class="separator">
	</div>
 <!-- Konten -------------------------------------------------------------------------->
 <div id="contentform">
 <?php $atrib='style="width:250px"; class="chzn-select field"'?>
 <table border="0" width="100%" cellpadding="0" cellspacing="0">
 	<tr valign="top">
	 	<td style="padding:10px;width:40%;">
	 	<ul>	        
	        <li>
				<div id="chart_container">
					
				</div>
			</li>
		</ul>
		</td>
	</tr>
</table>
</div>
</fieldset>
</div><!--container-->
<script type="text/javascript" src="<?= base_url() ?>js/chosen.jquery.js"></script>
	<script type="text/javascript">
			$(".chzn-select").chosen({no_results_text: "Data yang dicari tidak ditemukan"});
		</script>
<script type="text/javascript">
		jQuery(document).ready(function() 
			{
			var chart1 = new Highcharts.Chart({
		        chart: {
		            renderTo: 'chart_container',
		            type: 'line',
		            borderWidth: 2
		        },
		        title: {
		            text: 'Jumlah Data Helpdesk Tahun <?= $tahun;?>'
		        },
		        xAxis: {
		            categories: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni',
		            			'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember']
		        },
		        tooltip: {
					formatter: function() {
					return '<b>'+ this.series.name +'</b><br/>'+
					this.x +': '+ this.y +' item';
					}
				},  
		        yAxis: {
		            title: {
		                text: ''
		            }
		        },
		        series: [{
		            name: 'Request',
		            data: [<?php echo join($request, ',') ?>]
		        }, {
		            name: 'Done',
		            data: [<?php echo join($solved, ',') ?>]
		        }]
		    });

			});
	</script>
</body>
</html>